package 笔试.神策;

import java.util.Scanner;

/**
 * @author:谢君臣
 * @Date:2021/9/8-14:57
 * @version:1.0
 * @function:
 */
public class Main01 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String line = scanner.nextLine();
        line = line.replaceAll("\\s{1,}"," ");
        String[] split = line.split(" ");
        StringBuilder res = new StringBuilder();
        for (int i = 0; i < split.length; i++) {
            if (i==split.length-1)
                res.append(new StringBuilder(split[i]).reverse());
            else
                res.append(new StringBuilder(split[i]).reverse()+" ");
        }
        System.out.println(res);
    }
}
